package org.suk.dp.interpreter;

import java.text.MessageFormat;

/**
 * Description: 音符类<br/>
 * @version V1.0  2017/6/22 16:09  by 石冬冬(dongdong.shi@ucarinc.com) - Heil Hitler
 */
public class Note extends Expression {
    @Override
    public void execute(String key, double value) {
        String note = "";
        char k = key.toCharArray()[0];
        switch (k){
            case 'C': note = "1"; break;
            case 'D': note = "2"; break;
            case 'E': note = "3"; break;
            case 'F': note = "4"; break;
            case 'G': note = "5"; break;
            case 'A': note = "6"; break;
            case 'B': note = "7"; break;
        }
        System.out.println(MessageFormat.format("{0} ",note));
    }
}
